TARGET = prethreadserv

THR_OBJS = NetWorkProDefine.o ErrMsgPro.o PreThreadServ.o

INCLUDE += -I../

$(TARGET): $(THR_OBJS)
	$(CC) -o $@ $^ -lpthread

%.o: %.c
	$(CC) $(INCLUDE) -c $^

NetWorkProDefine.o: ../NetWorkProDefine.c
	$(CC) $(INCLUDE) -c ../NetWorkProDefine.c

ErrMsgPro.o: ../ErrMsgPro.c
	$(CC) $(INCLUDE) -c ../ErrMsgPro.c

default: $(TARGET)

.PHONY: clean

clean:
	-rm -f ./*.o
	-rm -f $(TARGET)